{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "417f3a80-b658-451f-a23a-f5046c71623b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3*4的原数组:\n",
      " [[49 85 86 32]\n",
      " [61  6  9 71]\n",
      " [80 78 73 89]]\n",
      "转置后4*3数组:\n",
      " [[49 61 80]\n",
      " [85  6 78]\n",
      " [86  9 73]\n",
      " [32 71 89]]\n",
      "变形后的2*6数组:\n",
      " [[49 85 86 32 61  6]\n",
      " [ 9 71 80 78 73 89]]\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "arr=np.random.randint(1,100, size=(3,4))\n",
    "print('3*4的原数组:\\n',arr)\n",
    "print('转置后4*3数组:\\n',arr.T)\n",
    "print('变形后的2*6数组:\\n',arr.reshape(2,6))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "277197d8-d072-4292-b9aa-fee4a610fb0d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
